<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Alex
 * Created Time: 2019/6/28 10:35
 * Modified Time: 2019/6/28 10:35
 * Version: 2.0
 */
namespace App\Modules\System\Controllers;
use App\Lib\Facades\FLAuth;
use Flower\Core\Http\BaseController;
use GuzzleHttp\Client;
use Illuminate\Support\Facades\Auth;
class TestController extends BaseController
{
    public function test()
    {
        //$user = Auth::guard("wx")->user();
        //echo $user->name;

        //$user = Auth::guard()->user();
       // echo $user->mobile;

      dd(  FLAuth::user());


        //echo 'sss';

        //$credentials = request(['email', 'password']);
        //print_r($credentials);
        //$token = auth("wx")->attempt($credentials);
        //echo $token;
    }
    public function getBossDataCenter(){
        $data = [
            'total'=>[
                'name'=>'2434',
                'ranking'=>'234',
                'today_bills'=>'556345',
                'today_expenditure'=>'556345',
                'profit'=>'234'
            ],
            'today'=>[
                'itmes'=>[
                    [
                    'title'=>'324',
                    'value'=>'44',
                    'unit'=>'34',
                    'rate'=>'34',
                    'change'=>1
                    ],
                    [
                        'title'=>'324',
                        'value'=>'44',
                        'unit'=>'34',
                        'rate'=>'34',
                        'change'=>1
                    ],
                    [
                        'title'=>'324',
                        'value'=>'44',
                        'unit'=>'34',
                        'rate'=>'34',
                        'change'=>1
                    ]
                ]
            ],
            'turnover'=>[
                'price'=>'456',
                'week_turnover'=>[
                    [
                        'key'=>'0:00',
                        'value'=>2
                    ],
                    [
                        'key'=>'3:00',
                        'value'=>4
                    ],
                    [
                        'key'=>'6:00',
                        'value'=>7
                    ],
                    [
                        'key'=>'9:00',
                        'value'=>9
                    ],
                    [
                        'key'=>'12:00',
                        'value'=>4
                    ],
                    [
                        'key'=>'15:00',
                        'value'=>2
                    ],
                    [
                        'key'=>'18:00',
                        'value'=>0
                    ],
                    [
                        'key'=>'21:00',
                        'value'=>0
                    ],
                    [
                        'key'=>'24:00',
                        'value'=>12
                    ]
                ],
                'payment_record'=>[

                ]
            ]
        ];

        return $this->display($data);
    }

    public function testttt()
    {
        $http = new Client();
        $response = $http->post('flower.test/api/get_service_list');

        dd($response);
    }
}